<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateAirdropsTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('airdrops', function (Blueprint $table) {
            $table->id();
            $table->timestamps();
            $table->integer('agent_id')->index()->comment('代理商id');
            $table->integer('goods_id')->index()->comment('空投商品id');
            $table->integer('number')->nullable()->comment('空投数量');
            $table->string('order_no', 32)->comment('订单号');
            $table->string('mobile', 15)->comment('手机号');
            $table->string('nickname', 64)->nullable()->comment('昵称');
            $table->string('goods_name', 128)->nullable()->comment('商品名称');
            $table->string('goods_img', 180)->nullable()->comment('商品图片');
            $table->string('qianbao', 255)->nullable()->comment('用户钱包地址');
            $table->text('tokenIds')->nullable()->comment('空投的tokenIds');
            $table->text('error_msg')->nullable()->comment('错误原因');
            $table->tinyInteger('status')->default(0)->comment('状态1成功 2失败');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('airdrops');
    }
}
